<?php
$s="计算机012ABC";
//strlen求字符串长度
echo strlen($s),"\n";
// trim、ltrim、rtrim 删空白
$s="     \t\t  How are you ?    \t\t  \t";
echo "[$s]\n";
echo "[",trim($s),"]\n";
echo "[",ltrim($s),"]\n";
echo "[",rtrim($s),"]\n";
$s="__:,Hi:::,__";
echo "[",trim($s, "_:,"),"]\n";

//strpos求子串在父串中出现的位置，找到返回整数，否则返回false
echo strpos("How are you?","o"),"\n"; //1
echo strpos("How are you?","o", 3),"\n"; //9
var_dump(strpos("How are you?","oo" )); //bool(false)
if(strpos("How are you?","H" )!==false){
    echo "find\n";
}else{
    echo "No find\n";
}
//bin2hex将字符串的每个字节转换为两个16进制位
echo bin2hex("计算机012ABC"),"\n";